'use strict';
const EVENT_ABI = require("./EventCtr_ABI.js");
const MINI2f_ABI = require("./Mini2f_ABI.js");
const USERACCOUNT_DATA_ABI = require("./UserAccount_Data_ABI.js");
const USERACCOUNT_ABI = require("./UserAccount_ABI.js");

module.exports = appInfo => {

    EVENT_ABI,
    MINI2f_ABI,
    USERACCOUNT_DATA_ABI,
    USERACCOUNT_ABI
    
    const config = exports = {};
    /**
     * controller default config
     */
    config.page = {
        limit: 5,
        offset: 1
    };


    config.mysql = {
        // 单数据库信息配置
        client: {
            // host
            host: '127.0.0.1',
            // 端口号
            port: 3306,
            // 用户名
            user: 'root',
            // 密码
            password: null,
            // 数据库名
            database: 'egg-sequelize-doc-default',
        },
        // 是否加载到 app 上，默认开启
        app: true,
        // 是否加载到 agent 上，默认关闭
        agent: false,
    }

    // use for cookie sign key, should change to your own and keep security
    config.keys = appInfo.name + '_1540262691769_3980';

    // add your config here
    config.middleware = [];
    config.sequelize = {
        dialect: 'mysql',
        host: '127.0.0.1',
        port: 3306,
        database: 'egg-sequelize-doc-default',
    };
    config.assets = {
        publicPath: '/public/',
        devServer: {
            debug: false,
            command: 'roadhog dev',
            port: 7001,
            env: {
                BROWSER: 'none',
                ESLINT: 'none',
                SOCKET_SERVER: 'http://127.0.0.1:7001',
                PUBLIC_PATH: 'http://127.0.0.1:7001',
            },
        },
    };

    config.security = {
        csrf: false,
    };


    return config;
};



